package developer.zyk.ability.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * @author zhangyongkang
 * @time 2025/5/12 20:34
 * @description
 */
@Data
@ConfigurationProperties(prefix = "ai-config")
public class AIProperties {

    private AiUserDefaultConfig userDefaultConfig;//用户默认配置

    private SupportModel supportModel;


    @Data
    public static class SupportModel {
        private List<ModelInfo> models;
        private String defaultKey;
    }

    @Data
    public static class AiUserDefaultConfig {
        private String modelType;
        private String systemPrompt;
        private Integer historySize;

        private double frequencyPenalty;

        private Boolean ragEnable;
        private String ragDefaultPrompt;
        private Integer ragTopN;
        private Double ragSimilarityThreshold;

        private Boolean autoParseFile;//自动解析文档

    }

    @Data
    public static class ModelInfo {
        private String key;
        private String label;
        private Boolean enable = true;
    }
}
